-----------------------------------
-- 对象池
-----------------------------------

local M = {}

M.__index = M

function M.createPool()
	local pool = {
		data = {}
	}
	setmetatable(pool, M)

	return pool
end

function M:isFree(key)
	return self.data[key] == true
end

function M:free(key)
	self.data[key] = true
end

function M:freeze(key)
	self.data[key] = false
end

return M